/**
 * Copyright (c) 2025   All rights reserved.
 *
 * https://www.sdl.io
 *
 * 版权所有，侵权必究！
 */

package io.sdl.service;

import io.sdl.common.service.BaseService;
import io.sdl.dto.UpdateUserDTO;
import io.sdl.entity.UserEntity;
import io.sdl.dto.LoginDTO;
import org.springframework.web.multipart.MultipartFile;

import java.util.Map;

/**
 * 用户
 * 
 * @authorDc 1211734836@qq.com
 */
public interface UserService extends BaseService<UserEntity> {

	UserEntity getByMobile(String mobile);

	UserEntity getUserByUserId(Long userId);

	/**
	 * 用户登录
	 * @param dto    登录表单
	 * @return        返回登录信息
	 */
	Map<String, Object> login(LoginDTO dto);



	//根据openid查询/创建用户
	Map<String, Object> findOrCreateUser(UserEntity user);


	void saveUserInfo(UpdateUserDTO dto);


	Integer saveUploadedFile(MultipartFile file, Long id);

	UserEntity passWordLogin(String account, String password);
}
